<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>1</cardCount>
<cardID>2959</cardID>
<listID>4616</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>on openStackhide menubarglobal dash,fieldHeader,buttonHeaderput "=====================================" & return into dashput " # Name......... Font Sz Ht A V ...........Rect " &¬"St LT SL WM AT FH DW DS Tx Sc" into fieldHeaderput " # Name......... Font Sz Ht A V ...........Rect " &¬"St SN AH SH HL .Icon -------- Sc" into buttonHeaderhide cd btn "more?"hide cd btn "from start?"if there is a cd btn "Help" then send mouseUp to cd btn "Help"pass openStackend openStackon closeStackshow menubarpass closeStackend closeStackfunction nicename strget the short name of strif word 2 of it is "id" or word 3 of it is "id" thenreturn "(untitled)"else return itend nicenamefunction readchunk filenameglobal howManyCharsReadput 0 into howManyCharsReadhide cd btn "more?"hide cd btn "from start?"put filesize(filename) into howBig -- a nice little XFCN from appleopen file fileNameput "reading " & filenameput empty into bg fld "view"if howBig < 30000 then -- maximum size of a fieldrepeat forever -- just put the whole damned thing in thereread from file fileName for 10000if it is empty then exit repeatput it after bg fld "view"end repeatelserepeat 3 timesread from file fileName for 9000put it after bg fld "view"end repeatput 27000 into howManyCharsReadread from file fileName until return -- nice not to end in mid-lineput it after bg fld "view" -- but DONT add to count of chars readput return & " [more...]"¬after bg fld "view"show cd btn "more?"show cd btn "from start?"end ifclose file fileNameset the scroll of bg fld "view" to 0if there is a cd btn "Display File" then send mouseUp to cd btn "Display File"hide msgend readchunkfunction readmore filenameglobal howManyCharsReadput howManyCharsRead / 9000 into numskipsopen file filenameput "reading " & filenameput empty into bg fld "view"repeat numskips timesread from file fileName for 9000end repeatrepeat 3 timesread from file fileName for 9000put it after bg fld "view"add the length of it to howManyCharsReadif the length of it < 9000 thenhide cd btn "more?"exit repeatend ifend repeatif the visible of cd btn "more?" then -- there IS moreread from file fileName until return -- so lets not end in mid-lineput it after bg fld "view"put return & " [more...]"¬after bg fld "view"end ifclose file filenameset the scroll of bg fld "view" to 0hide msgend readmoreon mouseupif the visible of cd fld "about the author"then hide cd fld "about the author"pass mouseupend mouseupon tryitset the printtextfont to "monaco"set the printtextheight to 12set the printtextsize to 9repeat with x = 1 to the number of lines of bg fld viewget line x of bg fld viewprint itend repeatreset printend tryit</script>